<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'>
    <title>注册</title>
    <link rel="stylesheet" href="css1/style.css"/>
    <script src="js1/rem.js"></script>
    <script src="js1/jquery-3.3.1.js"></script>

</head>
<body>
<div class="main">
    <img class="img" src="img1/background.jpg" alt="">
    <p class="title">请登陆</p>
    <p class="tip">Please Register</p>
    <ul class="input">
        <li class="left"><img src="img1/icon1.png" alt=""></li>
        <li class="right"><input type="number" id="name" value="" placeholder="请输入手机号"></li>
    </ul>
    <div class="input_yzm">
        <ul class="left">
        <li class="icon"><img src="img1/icon2.png" alt=""></li>
        <li class="text"><input type="number" id="yzm" placeholder="请输入验证码"></li>
        </ul>
        <ul class="right"><input type="button" id="code" value="获取验证码" onclick="codeButton()"></ul>
    </div>
    <ul class="input">
        <li class="left"><img src="img1/icon3.png" alt=""></li>
        <li class="right"><input type="number" id="pass" placeholder="请输入密码"></li>
    </ul>
    <ul class="btn" onclick="zhucBtn()">登陆</ul>
</div>
</body>
<script type="text/javascript">
    function codeButton(){
        var code = $("#code");
        code.attr("disabled","disabled");
        setTimeout(function(){
            code.css("opacity","1");
        },1000)
        var time = 60;
        var set=setInterval(function(){
            code.val(--time);
        }, 1000);
        setTimeout(function(){
            code.attr("disabled",false).val("重新获取");
            clearInterval(set);
        }, 60000);
    }
    function zhucBtn(){
        if($('#name').val()==''){
            msg('请输入手机号')
        }else if($('#yzm').val()==''){
            msg('请输入验证码')
        }else if($('#pass').val()==''){
            msg('请输入密码')
        }else {
            window.location.href = "http://www.yuchufang.top/html/index.html";
        }
    }
</script>

</html>
